const argv = require("yargs").argv;
import { getServerConfig } from "../server/libs/utils";
const serverConfig = getServerConfig().server;

const GlobVar = Object.assign(global, {
  ARGV: argv || {},
  MODE_DEV: process.env.NODE_ENV === "development",
  HOSTNAME: serverConfig.http.hostname || "localhost",
  PORT: serverConfig.http.port || 8000,
});

export { GlobVar };
